package com.example.phonerefresh.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;

import com.example.phonerefresh.R;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by l on 2016/11/29.
 */

public class BaseFragment extends Fragment {

    public static final int REFRESH_DELAY = 2000;

    public static final String KEY_ICON = "icon";
    public static final String KEY_COLOR = "color";

    protected List<Map<String,Integer>> mSampleList;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Map<String,Integer> map;
        mSampleList = new ArrayList<>();

        int[] icons = new int[]{
                R.mipmap.icon_1,
                R.mipmap.icon_2,
                R.mipmap.icon_3};
        int[] colors = new int[]{
                R.color.saffron,
                R.color.eggplant,
                R.color.sienna};

        for (int i = 0; i < icons.length; i++){
            map = new HashMap<>();
            map.put(KEY_ICON,icons[i]);
            map.put(KEY_COLOR,colors[i]);
            mSampleList.add(map);
        }
    }
}
